//
//  SongListViewController.h
//  MooreDoll
//
//  Created by Joe on 2014/12/4.
//  Copyright (c) 2014年 Tank. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MediaPlayer/MediaPlayer.h>
#import <MediaPlayer/MPMediaItemCollection.h>
#import <AVFoundation/AVAudioPlayer.h>
#import <AVFoundation/AVAssetReader.h>
#import <AVFoundation/AVAssetExportSession.h>
#import <CoreMedia/CoreMedia.h>
#import <AudioToolbox/AudioToolbox.h>
#import <AVFoundation/AVFoundation.h>

#import "SongInfo.h"
#import "SongListCell.h"

@protocol SongListViewControllerDelegate <NSObject>

-(void)sendAudioToXMPPWithDataPath:(NSString *)mp3Path andFileName:(NSString *)fileName andPathInApp:(NSString *)pathInApp;
-(void)sendMusicWithMediaItem:(MPMediaItem *)item;

@end

@interface SongListViewController : UIViewController<UITableViewDelegate,UITableViewDataSource>
{
    NSURL       *exportURL;
    AVPlayer    *player;
    NSTimer     *playbackTimer;
    int          nowTrack;
    NSURL       *assetURL;
    MPMediaItem *selectedSong;
    
}

@property(nonatomic,strong)NSMutableArray *Array_song;
@property(nonatomic,strong)MPMusicPlayerController *musicPlayer;
@property(nonatomic,strong)ChatRoom *chatRoom;
@property(nonatomic,weak  )id <SongListViewControllerDelegate> delegate;

@end
